from random import randint


class Die(object):
    """【类】骰  子"""

    def __init__(self, FP_num_sides=6) -> None:
        self.num_sides = FP_num_sides   # 骰子的面的个数（默认为6）
        return None

    def roll(self) -> int:
        """【类方法】返回骰子的值"""
        return randint(1, self.num_sides)


if (__name__ == "__main__"):
    # 测试代码
    die_test = Die()
    print("骰子的点数：", die_test.roll())